package org.liujing.jsw.client.ui;

import com.google.gwt.user.client.ui.*;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.*;

public class JLabel extends JComponent{
	private String text;
	public JLabel(String text){
		setText(text);
	}
	
	public void setText(String text) {
		String oldValue = this.text;
		this.text = text;
		//firePropertyChange("text", oldValue, text);
	
		getContainerElement().setInnerText(text);
		if (text == null || oldValue == null || !text.equals(oldValue)) {
		    revalidate();
		}
	}
    
    public String getText(){
    	return text;
    }
}
